#include "stdafx.h"
#include <iostream>
#include "Stock1.h"

int main_usestock(){
	using namespace std;
	cout.precision(2);
	cout.setf(ios_base::fixed,ios_base::floatfield);
	cout.setf(ios_base::showpoint);

	cout << "Using constructor to create new objects" <<endl;
	Stock1 stock1("NanoSmart",12,20.0);
	stock1.show();
	Stock1 *stock2 = new Stock1("Boffo objects",2,2.0);
	stock2->show();

	stock2 = &stock1;
	cout <<"Listing stock1 and stock2:" <<endl;
	stock1.show();
	stock2->show();

	cout <<"Using a constructor to reset an object" <<endl;
	stock1 = Stock1("Nifty Foods",10,50.0);
	cout << "Revised stock1:" <<endl;
	stock1.show();
	cout <<"Done"<<endl;
	return 0;
};